package com.gl.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gl.order.entity.TOrder;
import com.gl.order.entity.dto.*;
import com.gl.order.entity.dto.DeliverPageDto;
import com.gl.order.entity.vo.DeliverPageVo;
import com.gl.order.entity.vo.OrderInfoVo;
import com.gl.order.entity.vo.OrderPageVo;
import com.gl.order.entity.vo.PeripheralProductsVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @Author: liangSY
 * @Date: 2021/6/26
 * @ClassName: OrderService
 * @Description: OrderService描述
 */
public interface OrderService extends IService<TOrder> {

    /**
     * 添加订单
     * @param dto
     */
    TOrder add(OrderDto dto);

    /**
     * 复制订单
     * @param dto
     * @return
     */
    TOrder copy(OrderCopyDto dto);

    /**
     * 保存图片
     * @param sampleImgs
     * @param payImgs
     * @param oderId
     * @param orderNo
     */
    void saveImg(List<MultipartFile> sampleImgs, List<MultipartFile> payImgs, String oderId, String orderNo);

    /**
     * 编辑订单
     */
    void editOrder(UpdateOrderDto dto);

    /**
     * 分页查询
     */
    IPage<OrderPageVo> pageList(OrderPageDto dto);

    /**
     * 发货分页查询
     */
    IPage<DeliverPageVo> pageList(DeliverPageDto dto);

    /**
     * 发货分页查询
     */
    IPage<PeripheralProductsVo> pageList(PeripheralProductsPageDto dto);

    /**
     * 订单详情
     * @param orderId
     * @return
     */
    OrderInfoVo getOrderInfo(String orderId);

    /**
     * 删除订单
     * @param id
     */
    void delOrder(String id);
    void delOrders(List<String> ids);

    /**
     *  导出订单
     */
    void excelExport(HttpServletResponse response, OrderExcelDto dto) throws IOException;

    Map<String,Object> getWordData(String id);

}
